package Arrays;

public class _283_MoveZeroes {
    public void moveZeroes(int[] nums) {
        int count = 0;
        for(int i=0;i<nums.length;i++) {
            if (nums[i] != 0) {
                nums[count++] = nums[i];
            }
        }
        for(int j=nums.length-1;j>count-1;j--) {
            nums[j] = 0;
        }
        //solution circle two
        /*for(;count<nums.length;count++) {
            nums[count] = 0;
        }*/
    }
}

